package intelligent_driver;

public class Car implements Vehicle{
	
	private double position;
	private double velocity;
	private double acceleration;
	
	private double topSpeed;
	private double maxSpeed; //speed limit
	private double length;
	
	public Car(){
		position = 0;
		velocity = 7.5; // m/s
		acceleration = 7.5;
		topSpeed = 37.5; // 5*velocity
		maxSpeed = 30; // 4*velocity
		length = 4;
	}
	
	public Car(double p, double v, double a, double t, double m, double l){
		position = p;
		velocity = v;
		acceleration = a;
		topSpeed = t;
		maxSpeed = m;
		length = l;
	}

	@Override
	public double acceleration() {return acceleration;}

	@Override
	public double length() {return length;}

	@Override
	public double maxSpeed() {return maxSpeed;}

	@Override
	public double position() {return position;}

	@Override
	public double topSpeed() {return topSpeed;}

	@Override
	public double velocity() {return velocity;}

	@Override
	public void setAcceleration(double a) {acceleration = a;}

	@Override
	public void setMaxSpeed(double ms) {maxSpeed = ms;}

	@Override
	public void setPosition(double p) {position = p;}

	@Override
	public void setVelocity(double v) {velocity = v;}
}
